<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>${webConfig.name}</title>
    <meta name="keywords" content="${webConfig.keyword}">
    <link rel="stylesheet" href="${s.base}/mobile/css/weui.min.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/jquery-weui.min.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/index.css">
</head>
<style>
.weui-cells{
    top:-20px
}
.weui-cell{
    padding: 10px 20px
}
</style>
<body>
    <div class="head">
        <img src="${s.base}/mobile/img/47.png" alt="">
        <img src="${webConfig.logo}" alt="">
        <img src="${s.base}/mobile/img/42.png" alt="">
    </div>
    <div id="swiper" class="swiper-container" data-pagination='.swiper-pagination' data-autoplay="1000">
        <div class="swiper-wrapper">
            <#list bannerList as banner>
                <div class="swiper-slide">
                    <a href="${banner.url!'javascript:void(0)'}"><img style="width:100%;height: 200px" src="${banner.image}"/></a>
                </div>
            </#list>
            <div>
        </div>
    </div>
    <div class="cont_us">
        <p class="title_font_d">联系我们</p>
        <p class="title_font_d">contact us</p>
    </div>
    <div class="cont_us" style="align-items: flex-start;margin-top: 20px;margin-left: 20px">
        <p>电话：${webConfig.linkPhone}</p>
        <p>邮箱：${webConfig.eamil}</p>
        <p>QQ：${webConfig.qq}</p>
        <p>地址：${webConfig.address}</p>
    </div>
    <div class="input_text">
        <input class="weui-input" type="text" id="title" placeholder="留言标题">
        <input class="weui-input" type="text" id="email" placeholder="留言邮箱">
    </div>
    <div class="weui-cells weui-cells_form">
        <div class="weui-cell">
            <div class="weui-cell__bd">
            <textarea class="weui-textarea" id="content" placeholder="留言内容" rows="3"></textarea>
            </div>
        </div>
    </div>
    <div class="input_text" style="margin-top:-20px">
        <input class="weui-input" type="text" id="yzm" style="width: 62% !important;height: 32px;" placeholder="验证码">
        <div id="yzmContent"> </div>
    </div>
    <div class="foot_p">
        <button type="button" id="submitBtn" >提交</button>
    </div>
        <div style="width:100%;height:100px">

        </div>
        <div id="tarBar">
            <div class="tarbarFont active" onclick="goHomePage()">
                <img src="${s.base}/mobile/img/45.png" alt="">
                <p>首页</p>
            </div>
            <div class="tarbarFont" onclick="goProduct()">
                <img src="${s.base}/mobile/img/40.png" alt="">
                <p>服务中心</p>
            </div>
            <div class="tarbarFont" onclick="goNews()">
                <img src="${s.base}/mobile/img/27.png" alt="">
                <p>活动咨询</p>
            </div>
            <div class="tarbarFont" onclick="goLinkMe()">
                <img src="${s.base}/mobile/img/38.png" alt="">
                <p>联系我们</p>
            </div>
        </div>
</body>
</html>
<!-- body 最后 -->
<script src="${s.base}/mobile/js/jquery.min.js"></script>
<script src="${s.base}/mobile/js/jquery-weui.min.js"></script>
<!-- 如果使用了某些拓展插件还需要额外的JS -->
<script src="${s.base}/mobile/js/swiper.min.js"></script>
<script src="${s.base}/mobile/js/city-picker.min.js"></script>
<script src="${s.base}/mobile/js/base.js"></script>
<script  type="application/javascript" src="${s.base}/js/base/gVerify.js"></script>
<script type="text/javascript">
    $(".swiper-container").swiper();
    var verifyCode = new GVerify("yzmContent");//初始化验证码
    $("#submitBtn").on("click",function(){
        var yzm = $("#yzm").val();

        var title = $("#title").val();
        if(title == null || title == "") {
            $.toast("请输入留言标题", "text");
            return false;
        }

        var email = $("#email").val();
        if(email == null || email == "") {
            $.toast("请输入留言邮箱", "text");
            return false;
        }
        var content = $("#content").val();
        if(content == null || content == "") {
            $.toast("请输入留言内容", "text");
            return false;
        }
        if(yzm == null || yzm == "") {
            $.toast("请输入验证码", "text");
            return false;
        }
        var res = verifyCode.validate(yzm);
        if(!res){
            $.toast("验证码输入错误！", "text");
            return false;
        }
        var param = {title:title,email:email,content:content};
        $.showLoading("正在提交中");
        $.post("/phone/webMessage",param,function(result){
            if(1==result.returnInfo.state){
                $.hideLoading();
                $.alert("您已提交成功，我们会尽快处理！", function() {
                    //点击确认后的回调函数
                    window.location.reload();
                });

            }else{
                $.hideLoading();
                $.toast("提交失败", "text");
            }
        },"json");
    });


</script>